<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <p>表单修饰符——修饰v-model</p>
    <span>只能输入数字,使用场景购物车、电话号码</span>
    <input type="text" v-model.number="msg1">
    <hr>
    <span>延迟响应：将事件从input换成change。防抖节流</span>
    <input type="text" v-model.lazy="msg2">
    <p>{{msg2}}</p>
    <hr>
    <span>过滤首尾空格，使用场景，注册用户名</span>
    <input type="text" v-model.trim="msg3">
    <p>{{msg3}}</p>
  </div>
  <script src="../vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        msg1: 1,
        msg2: '',
        msg3: ''
      }
    })
  </script>
</body>
</html>